3.157 \(\int \cot ^4(c+d x) (a+a \sec (c+d x))^{3/2} \, dx\)

Optimal. Leaf size=144 \[ \frac{2 a^{3/2} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec (c+d x)+a}}\right )}{d}-\frac{a^{3/2} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a \sec (c+d x)+a}}\right )}{2 \sqrt{2} d}-\frac{\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{3 d}+\frac{3 a \cot (c+d x) \sqrt{a \sec (c+d x)+a}}{2 d} \]

[Out]

(2*a^(3/2)*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/d - (a^(3/2)*ArcTan[(Sqrt[a]*Tan[c + d*x])
/(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/(2*Sqrt[2]*d) + (3*a*Cot[c + d*x]*Sqrt[a + a*Sec[c + d*x]])/(2*d) - (Cot
[c + d*x]^3*(a + a*Sec[c + d*x])^(3/2))/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.148464, antiderivative size = 144, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {3887, 480, 583, 522, 203} \[ \frac{2 a^{3/2} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec (c+d x)+a}}\right )}{d}-\frac{a^{3/2} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a \sec (c+d x)+a}}\right )}{2 \sqrt{2} d}-\frac{\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{3 d}+\frac{3 a \cot (c+d x) \sqrt{a \sec (c+d x)+a}}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^4*(a + a*Sec[c + d*x])^(3/2),x]

[Out]

(2*a^(3/2)*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/d - (a^(3/2)*ArcTan[(Sqrt[a]*Tan[c + d*x])
/(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/(2*Sqrt[2]*d) + (3*a*Cot[c + d*x]*Sqrt[a + a*Sec[c + d*x]])/(2*d) - (Cot
[c + d*x]^3*(a + a*Sec[c + d*x])^(3/2))/(3*d)

Rule 3887

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[(-2*a^(m/2 +
 n + 1/2))/d, Subst[Int[(x^m*(2 + a*x^2)^(m/2 + n - 1/2))/(1 + a*x^2), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c +
d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && IntegerQ[n - 1/2]

Rule 480

Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[((e*x)^(m
 + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*c*e*(m + 1)), x] - Dist[1/(a*c*e^n*(m + 1)), Int[(e*x)^(m +
n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[(b*c + a*d)*(m + n + 1) + n*(b*c*p + a*d*q) + b*d*(m + n*(p + q + 2) + 1)*
x^n, x], x], x] /; FreeQ[{a, b, c, d, e, p, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[m, -1] && IntBino
mialQ[a, b, c, d, e, m, n, p, q, x]

Rule 583

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[(e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*c*g*(m + 1)), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \cot ^4(c+d x) (a+a \sec (c+d x))^{3/2} \, dx &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{x^4 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{d}\\ &=-\frac{\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{3 d}-\frac{\operatorname{Subst}\left (\int \frac{-9 a-3 a^2 x^2}{x^2 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{3 d}\\ &=\frac{3 a \cot (c+d x) \sqrt{a+a \sec (c+d x)}}{2 d}-\frac{\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{3 d}+\frac{\operatorname{Subst}\left (\int \frac{-21 a^2-9 a^3 x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{6 d}\\ &=\frac{3 a \cot (c+d x) \sqrt{a+a \sec (c+d x)}}{2 d}-\frac{\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{3 d}+\frac{a^2 \operatorname{Subst}\left (\int \frac{1}{2+a x^2} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{2 d}-\frac{\left (2 a^2\right ) \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{d}\\ &=\frac{2 a^{3/2} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{d}-\frac{a^{3/2} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a+a \sec (c+d x)}}\right )}{2 \sqrt{2} d}+\frac{3 a \cot (c+d x) \sqrt{a+a \sec (c+d x)}}{2 d}-\frac{\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{3 d}\\ \end{align*}

Mathematica [C]  time = 23.7178, size = 5552, normalized size = 38.56 \[ \text{Result too large to show} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Cot[c + d*x]^4*(a + a*Sec[c + d*x])^(3/2),x]

[Out]

Result too large to show

________________________________________________________________________________________

Maple [B]  time = 0.234, size = 372, normalized size = 2.6 \begin{align*}{\frac{a}{12\,d \left ( \sin \left ( dx+c \right ) \right ) ^{3}}\sqrt{{\frac{a \left ( \cos \left ( dx+c \right ) +1 \right ) }{\cos \left ( dx+c \right ) }}} \left ( 12\,\sqrt{2} \left ( \cos \left ( dx+c \right ) \right ) ^{2}\sin \left ( dx+c \right ) \sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( dx+c \right ) }{\cos \left ( dx+c \right ) }\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}} \right ) +3\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}\sin \left ( dx+c \right ) \sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\ln \left ( -{\frac{1}{\sin \left ( dx+c \right ) } \left ( -\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\sin \left ( dx+c \right ) +\cos \left ( dx+c \right ) -1 \right ) } \right ) -12\,\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( dx+c \right ) }{\cos \left ( dx+c \right ) }\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}} \right ) \sin \left ( dx+c \right ) -22\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}-3\,\sin \left ( dx+c \right ) \ln \left ( -{\frac{1}{\sin \left ( dx+c \right ) } \left ( -\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\sin \left ( dx+c \right ) +\cos \left ( dx+c \right ) -1 \right ) } \right ) \sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}-4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}+18\,\cos \left ( dx+c \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^4*(a+a*sec(d*x+c))^(3/2),x)

[Out]

1/12/d*a*(a*(cos(d*x+c)+1)/cos(d*x+c))^(1/2)*(12*2^(1/2)*cos(d*x+c)^2*sin(d*x+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1)
)^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/cos(d*x+c))+3*cos(d*x+c)^2*sin(d*x
+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*ln(-(-(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)+cos(d*x+c)-1)/s
in(d*x+c))-12*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*2^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^
(1/2)*sin(d*x+c)/cos(d*x+c))*sin(d*x+c)-22*cos(d*x+c)^3-3*sin(d*x+c)*ln(-(-(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2
)*sin(d*x+c)+cos(d*x+c)-1)/sin(d*x+c))*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)-4*cos(d*x+c)^2+18*cos(d*x+c))/sin(
d*x+c)^3

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c))^(3/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [A]  time = 2.5628, size = 1403, normalized size = 9.74 \begin{align*} \left [\frac{3 \,{\left (\sqrt{2} a \cos \left (d x + c\right ) - \sqrt{2} a\right )} \sqrt{-a} \log \left (\frac{2 \, \sqrt{2} \sqrt{-a} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, a \cos \left (d x + c\right )^{2} + 2 \, a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) \sin \left (d x + c\right ) + 12 \,{\left (a \cos \left (d x + c\right ) - a\right )} \sqrt{-a} \log \left (-\frac{8 \, a \cos \left (d x + c\right )^{3} - 4 \,{\left (2 \, \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right )\right )} \sqrt{-a} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) - 7 \, a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right ) + 1}\right ) \sin \left (d x + c\right ) + 4 \,{\left (11 \, a \cos \left (d x + c\right )^{2} - 9 \, a \cos \left (d x + c\right )\right )} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}}}{24 \,{\left (d \cos \left (d x + c\right ) - d\right )} \sin \left (d x + c\right )}, \frac{12 \,{\left (a \cos \left (d x + c\right ) - a\right )} \sqrt{a} \arctan \left (\frac{2 \, \sqrt{a} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right )}{2 \, a \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right ) - a}\right ) \sin \left (d x + c\right ) + 3 \,{\left (\sqrt{2} a \cos \left (d x + c\right ) - \sqrt{2} a\right )} \sqrt{a} \arctan \left (\frac{\sqrt{2} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt{a} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) + 2 \,{\left (11 \, a \cos \left (d x + c\right )^{2} - 9 \, a \cos \left (d x + c\right )\right )} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}}}{12 \,{\left (d \cos \left (d x + c\right ) - d\right )} \sin \left (d x + c\right )}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c))^(3/2),x, algorithm="fricas")

[Out]

[1/24*(3*(sqrt(2)*a*cos(d*x + c) - sqrt(2)*a)*sqrt(-a)*log((2*sqrt(2)*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d
*x + c))*cos(d*x + c)*sin(d*x + c) + 3*a*cos(d*x + c)^2 + 2*a*cos(d*x + c) - a)/(cos(d*x + c)^2 + 2*cos(d*x +
c) + 1))*sin(d*x + c) + 12*(a*cos(d*x + c) - a)*sqrt(-a)*log(-(8*a*cos(d*x + c)^3 - 4*(2*cos(d*x + c)^2 - cos(
d*x + c))*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c) - 7*a*cos(d*x + c) + a)/(cos(d*x + c)
+ 1))*sin(d*x + c) + 4*(11*a*cos(d*x + c)^2 - 9*a*cos(d*x + c))*sqrt((a*cos(d*x + c) + a)/cos(d*x + c)))/((d*c
os(d*x + c) - d)*sin(d*x + c)), 1/12*(12*(a*cos(d*x + c) - a)*sqrt(a)*arctan(2*sqrt(a)*sqrt((a*cos(d*x + c) +
a)/cos(d*x + c))*cos(d*x + c)*sin(d*x + c)/(2*a*cos(d*x + c)^2 + a*cos(d*x + c) - a))*sin(d*x + c) + 3*(sqrt(2
)*a*cos(d*x + c) - sqrt(2)*a)*sqrt(a)*arctan(sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(sqr
t(a)*sin(d*x + c)))*sin(d*x + c) + 2*(11*a*cos(d*x + c)^2 - 9*a*cos(d*x + c))*sqrt((a*cos(d*x + c) + a)/cos(d*
x + c)))/((d*cos(d*x + c) - d)*sin(d*x + c))]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**4*(a+a*sec(d*x+c))**(3/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 7.36641, size = 501, normalized size = 3.48 \begin{align*} -\frac{3 \, \sqrt{2} \sqrt{-a} a \log \left ({\left (\sqrt{-a} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \sqrt{-a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a}\right )}^{2}\right ) \mathrm{sgn}\left (\cos \left (d x + c\right )\right ) + 24 \, \sqrt{-a} a \log \left ({\left |{\left (\sqrt{-a} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \sqrt{-a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a}\right )}^{2} - a{\left (2 \, \sqrt{2} + 3\right )} \right |}\right ) \mathrm{sgn}\left (\cos \left (d x + c\right )\right ) - 24 \, \sqrt{-a} a \log \left ({\left |{\left (\sqrt{-a} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \sqrt{-a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a}\right )}^{2} + a{\left (2 \, \sqrt{2} - 3\right )} \right |}\right ) \mathrm{sgn}\left (\cos \left (d x + c\right )\right ) + \frac{8 \, \sqrt{2}{\left (6 \,{\left (\sqrt{-a} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \sqrt{-a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a}\right )}^{4} \sqrt{-a} a^{2} \mathrm{sgn}\left (\cos \left (d x + c\right )\right ) - 9 \,{\left (\sqrt{-a} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \sqrt{-a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a}\right )}^{2} \sqrt{-a} a^{3} \mathrm{sgn}\left (\cos \left (d x + c\right )\right ) + 5 \, \sqrt{-a} a^{4} \mathrm{sgn}\left (\cos \left (d x + c\right )\right )\right )}}{{\left ({\left (\sqrt{-a} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \sqrt{-a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a}\right )}^{2} - a\right )}^{3}}}{24 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c))^(3/2),x, algorithm="giac")

[Out]

-1/24*(3*sqrt(2)*sqrt(-a)*a*log((sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2)*sgn(c
os(d*x + c)) + 24*sqrt(-a)*a*log(abs((sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 -
 a*(2*sqrt(2) + 3)))*sgn(cos(d*x + c)) - 24*sqrt(-a)*a*log(abs((sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/
2*d*x + 1/2*c)^2 + a))^2 + a*(2*sqrt(2) - 3)))*sgn(cos(d*x + c)) + 8*sqrt(2)*(6*(sqrt(-a)*tan(1/2*d*x + 1/2*c)
 - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^4*sqrt(-a)*a^2*sgn(cos(d*x + c)) - 9*(sqrt(-a)*tan(1/2*d*x + 1/2*c) -
sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2*sqrt(-a)*a^3*sgn(cos(d*x + c)) + 5*sqrt(-a)*a^4*sgn(cos(d*x + c)))/((sq
rt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 - a)^3)/d